NetworkVariable

Constructor

NetworkVariable has 3 overloads.

Definition

public NetworkVariable()
public NetworkVariable()

Definition

public NetworkVariable(T initialValue)
public NetworkVariable(T initialValue)

Parameters

ParameterDescription
T initialValue

NetworkVariable(byte, T)

Creates a new network variable with a default value.

Definition

public NetworkVariable(byte id, T initialValue)
public NetworkVariable(byte id, T initialValue)

Parameters

ParameterDescription
byte id

Manually assign an ID. This ID is used to identify variables for a give SpatialNetworkObject

T initialValue

The default value when the network object is created